package org.lisy.java.oop;

/**
 * 接口
 * 
 * @author lisy
 */
public class InterfaceOperate implements Hockey {
	/**
	 * 1.接口不能用于实例化对象
	 * 2.接口没有构造方法
	 * 3.接口中所有的方法必须是抽象方法
	 * 4.接口不能包含成员变量，除了 static 和 final 变量
	 * 5.接口不是被类继承了，而是要被类实现
	 * 6.接口支持多继承,一个类可以实现多个接口
	 */
	
	@Override
	public void setHomeTeam(String name) {
		// TODO Auto-generated method stub
		System.out.println("Interface setHomeTeam");
	}

	@Override
	public void setVisitingTeam(String name) {
		// TODO Auto-generated method stub
		System.out.println("Interface setVisitingTeam");
	}

	@Override
	public void homeTeamScored(int points) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void visitingTeamScored(int points) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void endOfQuarter(int quarter) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void homeGoalScored() {
		// TODO Auto-generated method stub
		System.out.println("Interface homeGoalScored");
	}

	@Override
	public void visitingGoalScored() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void endOfPeriod(int period) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void overtimePeriod(int ot) {
		// TODO Auto-generated method stub
		
	}
	
	public static void main(String args[]){
		InterfaceOperate i = new InterfaceOperate();
		i.homeGoalScored();
		String a = "0";
		i.setHomeTeam(a);
	}
}

interface Sports {
	
	public void setHomeTeam(String name);

	public void setVisitingTeam(String name);
}

interface Football extends Sports {
	
	public void homeTeamScored(int points);

	public void visitingTeamScored(int points);

	public void endOfQuarter(int quarter);
}

interface Hockey extends Sports, Football {
	
	public void homeGoalScored();

	public void visitingGoalScored();

	public void endOfPeriod(int period);

	public void overtimePeriod(int ot);
}